Search
Other Articles Anywhere questions
Forum

How to {if}-test on joomla-tag-image within a {foreach}-loop

Ton van Loon's Avatar Ton van Loon
How do I test whether a joomla-tag has an image within a {foreach}-loop?

Below code does not work for me. Without the {if}-statement it works (but it leaves a blank column for joomla-tags that have no image)
{article id="64"}
  <div class="row">
    {foreach data="tags"}
      {if row:image-intro}
        <div class="col-sm-2 p-3"> 
          [row:image-intro class="rounded"]
        </div>
      {/if}
   {/foreach}
  </div>
{/article}

Environment:
- J4
- AA 12.1.2PRO
Peter van Westen's Avatar Peter van Westen ADMIN
It is currently not possible to use {if} tags inside {foreach} loops.
Please post a rating at the Joomla! Extensions Directory
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription